import { createApp } from "vue";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import ElementPlus from "element-plus";

import router from "./router";

// @ts-expect-error
import zhCn from "element-plus/dist/locale/zh-cn.mjs";

import "element-plus/dist/index.css";
import "./style.css";

import App from "./App.vue";

import "./router/permission";

// unocss
import 'virtual:uno.css'

export const app = createApp(App);
app.use(router);
app.use(ElementPlus, {
  locale: zhCn,
  // size: "large"
});

// 数据管理
const pinia = createPinia();
app.use(pinia);
pinia.use(piniaPluginPersistedstate);

app.mount("#app");
